package com.hc.api.controller;

import com.hc.comm.utils.JsonUtils;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hc.comm.base.BaseController;
import com.hc.comm.dto.AppManagerDTO;


@Controller
@Scope("prototype")
@RequestMapping("/demo/")
public class DemoController extends BaseController {

//	@Resource(name = "userService")
//	private IUserService userService;

//	@Resource(name = "appManagerService")
//	private IAppManagerService appManagerService;


    @RequestMapping("index")
    public String index() throws Exception {

        return "api";
    }


    @RequestMapping("json")
    public void json() throws Exception {
        JsonUtils.toSuccessResult(request, response, "这是一个测试页面!");
        AppManagerDTO dto = new AppManagerDTO();
        dto.setToken("xmu_123456");
        //AppManagerModel model = appManagerService.getOne(dto);

//		Map<String, AppManagerModel> resultMap = new HashMap<String, AppManagerModel>();
//		resultMap.put("appInfo", model);
//		MyLog.log("name = " + model.getName());

//		writeToJson(resultMap);
    }

}
